package com.exam.online.system.dao;

import com.exam.online.system.entity.TeacherCourse;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TeacherCourseDAO {
    int deleteByPrimaryKey(Integer id);

    int insert(TeacherCourse record);

    int insertSelective(TeacherCourse record);

    TeacherCourse selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TeacherCourse record);

    int updateByPrimaryKey(TeacherCourse record);

    @Select("select course_id from `t_teacher_course` where teacher_id = #{teacherId}")
    List<Integer> selectByTeacherId(@Param("teacherId") Integer teacherId);

    @Select("select * from `t_teacher_course`")
    List<TeacherCourse> selectAll();

}